#!/usr/bin/env python

import gtk

class signals:

   def __init__(self,blend):
      self.blend = blend;

   def on_response(self,widget,response,dialog):
      if response == gtk.RESPONSE_ACCEPT:
         # We have to do some checks on the data we receive from the user
         alias = str(dialog.aliasTextEntry.get_text().strip());
         
         buds = [];
         
         for i in range(0,len(dialog.checks)):
            if dialog.checks[i][0].get_active():
               buds.append(dialog.checks[i][1]);
               
         # Create a room
         self.blend.conn.create_room(alias,buds);
         
         widget.destroy();     
      else:
         widget.destroy();